package com.complaint.rest.model;

import com.google.appengine.api.datastore.Blob;

import javax.persistence.Entity;
import javax.persistence.Id;
import javax.xml.bind.annotation.XmlRootElement;
import java.io.Serializable;

/**
 * Created by Alex
 */
@Entity(name = "Attachment")
@XmlRootElement
public class Attachment implements Serializable {
    @Id
    private String id;
    private String complaintId;
    private String type;
    private String name;
    private Blob data;

    public Attachment() {
    }

    public Attachment(String id, String complaintId, String type, String name, Blob data) {
        this.id = id;
        this.complaintId = complaintId;
        this.type = type;
        this.name = name;
        this.data = data;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getComplaintId() {
        return complaintId;
    }

    public void setComplaintId(String complaintId) {
        this.complaintId = complaintId;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Blob getData() {
        return data;
    }

    public void setData(Blob data) {
        this.data = data;
    }
}
